package com.example.controller;

import com.example.common.OperationLogger;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by Geekkiller on 2017/10/14.
 */

@Controller
@RequestMapping("/welcome")
public class WelcomeController {

    @OperationLogger(modelName = "WelcomeController", option = "getWelcome")
    @RequestMapping("/getWelcome")
    public String getWelcome() {
        //异常拦截测试
        int i = 9 / 0;
        System.out.println("controller方法执行！");
        return "/quartz/message";
    }


    @RequestMapping("/backLogin")
    public ModelAndView backLogin() {
        String message = "这个是要传递的数据";
        return new ModelAndView("/quartz/message", "message", message);
    }

}
